#Contains the soil hydraulic parameters of sandy clay loam and the function
#for converting volumetric soil moisture to pressure head.

import numpy as np 
pars_MZs = np.loadtxt('./core_mz1/Parameters_LSTM.txt')

def ManagementZone_1():
    soilPars = {}
    soilPars['thetaR'] = pars_MZs[0,4]
    soilPars['thetaS'] = pars_MZs[0,1]
    soilPars['alpha']  = pars_MZs[0,2]
    soilPars['n']      = pars_MZs[0,3]
    soilPars['m']      = 1-1/soilPars['n']
    soilPars['Ks']     = (pars_MZs[0,0])/86400
    soilPars['neta']   = 0.5
    soilPars['Ss']     = 0.00001

    return soilPars

def ConvertToPressureHead(volMoisture,soilPars):
	#Dependence of pressure head on the volumetric moisture content
	presHead = (((((volMoisture - soilPars['thetaR']) / (soilPars['thetaS'] - soilPars['thetaR'])) ** (1. / (-(1-1/(soilPars['n']))))
              - 1)) ** (1. / (soilPars['n']))) / (-soilPars['alpha'])
	return presHead
